//配置mock

import Mock from "mockjs";
import banner from "./banner.json";
import floor from "./floor.json";
import address from "./address.json";

//拦截首页轮播图的ajax
Mock.mock("/api/banner", "get", () => {
  return {
    code: 200,
    message: "成功",
    data: banner,
  };
});

//拦截首页楼层的ajax
Mock.mock("/api/floor", "get", () => {
  return {
    code: 200,
    message: "成功",
    data: floor,
  };
});
//拦截收货地址的请求
Mock.mock("/api/address", "get", () => {
  return {
    code: 200,
    message: "成功",
    data: address,
  };
});
